<extend name="Index:base" />
<block name="title"><title>店铺管理</title></block>
<block name="style">
 <style>
.main,.panel-default>.panel-heading{
background:none;
}
body{
background:none;
}
.panel.panel-default,.panel .panel-body,.panel .panel-heading,.table-bordered {
	border:none;
}
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
	border:none;		
	padding:15px;	
	line-height:8px;
	height: 8px;
	border: 1px solid #d4d4d4;
}
.name strong{
color:#000000;
font-size:15px;
font-weight:600;
}
.name {
	color:#20a8d8;
	font-size:12px;
}
.smallfont {
	color:#9c9c9c;
	font-size:12px;
}

.align-center{
	text-align:center; 
}
.title2{
text-align:center;
}
.table-bordered > tbody > tr .wd{
	text-align:left;	
}

.col-xs-2,.col-xs-4{
padding-right:0;
margin:10px 0;
}
.col-sm-3{
width:10%;
}
.col-sm-2{
width:8%;
}
.col-sm-1{
width:5%;
}
.col-sm-4{
width:18%;
}
.col-sm-1,.col-sm-2{
margin:16px 0;
}
.col-sm-3,.col-sm-4{
margin:10px 0;
}
.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4{
padding-right:0;
}
 </style>
</block>
	<!-- start: Header -->
<block name="body">

			<!-- end: Main Menu -->
						
		<!-- start: Content -->
		<div class="main ">
		
			<div class="row">
				<div class="col-lg-12">
					<h3 class="page-header"><i class="fa fa-life-bouy"></i>店铺管理</h3>
				</div>
			</div>

			<div class="row">		
				<div class="col-lg-12" >
					<div class="panel " style="border:none;">
						<div class="panel-heading" style="border:none;">
							
							<a class="btn btn-default" href="{:U('Store/index')}" >店铺管理</i></a>
							&nbsp;&nbsp;&nbsp;
							
							<a class="btn btn-default" href="{:U('Store/index')}?store_join=store_join" id="add_right">开店申请</i></a>
													
							&nbsp;&nbsp;&nbsp;
							<a class="btn btn-default" href="#" id="add_right">续签申请</i></a>
							&nbsp;&nbsp;&nbsp;
							<a class="btn btn-default" href="#" id="add_right">经营类目申请</i></a>
							&nbsp;&nbsp;&nbsp;
							
							<h2 ><span class="break"></span><strong><in name="join.joinin_state" value="10,11">审核</in><in name="join.joinin_state" value="20,30,31,40">查看</in>
							</strong></h2>						
						</div>&nbsp;&nbsp;&nbsp;
					</div>
				</div><!--/col-->
				<div class="col-lg-8" >
					<div class="panel panel-default">
						<div class="panel-heading">
							<h2><span class="break"></span><strong>公司及联系人信息</strong></h2>
						</div>
						<div class="">
							<table class="table table-bordered table-striped table-condensed table-hover" style="border: 1px solid #d4d4d4;">
 
								  <tbody>

									<tr>
										<td>公司名称：</td>
                                        <td colspan="6" >{$join.company_name}</td>                                      
									</tr>	
									<tr>
										<td>公司所在地：</td>
                                        <td>{$join.company_address}</td>
                                        <td>公司详细地址：</td>
										<td colspan="4">{$join.company_address_detail}</td>                                       
									</tr>
									<tr>
										<td>公司电话：</td>
                                        <td>{$join.company_phone}</td>
										<td>员工总数：</td>  
										<td>{$join.company_employee_count}</td>
										<td>注册资金：</td>  
										<td>{$join.company_registered_capital}万元</td>
										
									</tr>
									<tr>
										<td>联系人姓名：</td>
                                        <td>{$join.contacts_name}</td>
										<td>联系人电话：</td>  
										<td>{$join.contacts_phone}</td>
										<td>电子邮箱：</td>  
										<td>{$join.contacts_email}</td>
										
									</tr>									
								  </tbody>
							 </table>  
     
						</div>
					</div>
				</div>	

				<div class="col-lg-8" >
					<div class="panel panel-default">
						<div class="panel-heading">
							<h2><span class="break"></span><strong>营业执照信息（副本）</strong></h2>
						</div>
						<div class="">
							<table class="table table-bordered table-striped table-condensed table-hover" style="border: 1px solid #d4d4d4;">
 
								  <tbody>

									<tr>
										<td style="width:20%">营业执照号：</td>
                                        <td colspan="6" >{$join.business_licence_number}</td>                                      
									</tr>	
									<tr>
										<td>营业执照所在地：</td>
                                        <td colspan="6" >{$join.business_licence_address}</td>                                      
									</tr>
									<tr>
										<td>法定经营范围：</td>
                                        <td colspan="6" >{$join.business_sphere}</td>                                      
									</tr>	
									<tr>
										<td>营业执照电子版：</td>
                                        <td colspan="6">
											<if condition="$join.business_licence_number_electronic neq ''">
											<a nctype="nyroModal" href="{$join.business_licence_number_electronic}" target="_blank"> <img src="{$join.business_licence_number_electronic}" alt=""  <if condition="$join.business_licence_number_electronic neq ''"> style="min-width: 139px;height: 139px; padding: 8px 5px;" </if> > </a>
											<else/>
											<a nctype="nyroModal" href="{$join.organization_code_electronic}" target="_blank"> <img src="{$join.organization_code_electronic}" alt="" <if condition="$join.organization_code_electronic neq ''"> style="min-width: 139px;height: 139px; padding: 8px 5px;" </if>> </a>
											</if>
										</td>                                      
									</tr>									
								  </tbody>
							 </table>  
     
						</div>
					</div>
				</div>	
				
				<div class="col-lg-8" >
					<div class="panel panel-default">
						<div class="panel-heading">
							<h2><span class="break"></span><strong>结算账号信息：</strong></h2>
						</div>
						<div class="">
							<table class="table table-bordered table-striped table-condensed table-hover" style="border: 1px solid #d4d4d4;">
 
								  <tbody>

									<tr>
										<td style="width:20%">银行开户名：</td>
                                        <td colspan="6" >{$join.settlement_bank_account_name}</td>                                      
									</tr>	
									<tr>
										<td>公司银行账号：</td>
                                        <td colspan="6" >{$join.settlement_bank_account_number}</td>                                      
									</tr>
									<tr>
										<td>开户银行支行名称：</td>
                                        <td colspan="6" >{$join.bank_name}</td>                                      
									</tr>	
									<tr>
										<td>支行联行号：</td>
                                        <td colspan="6" >{$join.bank_code}</td>                                      
									</tr>
									<tr>
										<td>开户银行所在地：</td>
                                        <td colspan="6" >{$join.bank_address}</td>                                      
									</tr>									
								  </tbody>
							 </table>  
     
						</div>
					</div>
				</div>	

				<div class="col-lg-8" >
					<div class="panel panel-default">
						<div class="panel-heading">
							<h2><span class="break"></span><strong>店铺经营信息：</strong></h2>
						</div>
						<div class="">
							<table class="table table-bordered table-striped table-condensed table-hover" style="border: 1px solid #d4d4d4;">
 
								  <tbody>

									<tr>
										<td style="width:20%">卖家账号：</td>
                                        <td colspan="6" >{$join.seller_name}</td>                                      
									</tr>	
									<tr>
										<td>店铺名称：</td>
                                        <td colspan="6" >{$join.store_name}</td>                                      
									</tr>
									<tr>
										<td>店铺等级：</td>
                                        <td colspan="6" >{$join.sg_name}</td>                                      
									</tr>	
									<tr>
										<td>开店时长：</td>
                                        <td colspan="6" >{$join.joinin_year} 年</td>                                      
									</tr>
									<tr>
										<td>店铺分类：</td>
                                        <td colspan="6" >{$join.sc_name}（开店费用：{$join.sg_info} 元/年）</td>                                      
									</tr>	
									<tr>
										<td>应付总金额：</td>
                                        <td colspan="6" >
											<input type="text" value="{$join.paying_amount}" name="paying_amount" class="w100">元
										</td>                                      
									</tr>	
									<tr>
										<td>经营类目：</td>
                                        <td colspan="6" >
											<table border="0" cellpadding="0" cellspacing="0" id="table_category" >
												  <thead>
													<tr style="background: rgb(255, 255, 255);">
													  <th>分类1</th>
													  <th>分类2</th>
													  <th>分类3</th>
													  <th>比例</th>
													</tr>
												  </thead>
												  <tbody>
													<volist name="store_class" id="vo">
													<tr style="background: rgb(255, 255, 255);">
													  <td>{$vo.gc_name}</td>
													  <td></td>
													  <td></td>
													  <td>
														<input type="text" nctype="commis_rate" value="{$vo.commis_rate}" name="commis_rate[]" > %
													  </td>
													</tr>
													</volist>
												  </tbody>
											</table>										
										</td>                                      
									</tr>
									<in name="join.joinin_state" value="11,31,40">
									<tr>
										<td>付款凭证：</td>
                                        <td colspan="6">											
											<a nctype="nyroModal" href="{$join.paying_money_certificate}" target="_blank"> <img src="{$join.paying_money_certificate}" alt="" <if condition="$join.paying_money_certificate neq ''"> style="min-width: 149px;height: 149px; padding: 8px 5px;" </if> > </a>	
										</td>                                      
									</tr>
									<tr>
										<td>付款凭证说明：</td>
                                        <td colspan="6" >{$join.paying_money_certificate_explain}</td>                                      
									</tr>
									</in>
									<in name="join.joinin_state" value="10,30,11">
									<tr>
										<td>审核意见：</td>
                                        <td colspan="6" >
										<textarea id="joinin_message" name="joinin_message" rows="5" class="form-control col-lg-10" >{$join.joinin_message}</textarea>
										</td>                                      
									</tr>
									</in>
								  </tbody>
							 </table>  
     
						</div>
						
					</div>
				</div>	
				<div class="col-lg-8" >
					<div id="onclick">
						<in name="join.joinin_state" value="10">
						<div class="panel-heading">
							<a class="btn btn-success" href="#" data-id="{$join.member_id}" data-state="20">通过</a>&nbsp;&nbsp;
							<a class="btn btn-danger" href="#" data-id="{$join.member_id}"  data-state="30">拒绝</a>
						</div>
						</in>
						<in name="join.joinin_state" value="11">
						<div class="panel-heading">
							<a class="btn btn-success" href="#" data-id="{$join.member_id}" data-state="40">通过</a>&nbsp;&nbsp;
							<a class="btn btn-danger" href="#" data-id="{$join.member_id}"  data-state="31">拒绝</a>
						</div>
						</in>
					</div>
				</div>					
			</div><!--/row-->				
			
		<!-- end: Content -->
		<br><br><br>
		
	</div><!--/container-->
	
</block>
<block name="script">
<script>


$("#onclick a").click(function(){

    var id = $(this).attr('data-id');
	var state= $(this).attr('data-state');
	var get = 0;
	var msg= $("#joinin_message").val();
	if(state==30 || state==31){
		if(!msg){
			alert('请填写拒绝原因');
		} else {
			get = 1;
		}	 
	} else {
		get = 1;
	}
	
	if (get == 1) {
	
		$.ajax({
			url:"{:U('Store/edit_stjonin')}",
			data:{id:id,state:state,msg:msg},
			type:'post',
			dataType:'json',
			success:function (e) {			
				//alert(e);
				if (e.info==1) {
					alert('操作成功');
					location.reload();
				}else {
					alert(e.info);					
				} 
			
			}
		});	
	}

});
</script>
</block>	









